package edu.sctu.liangyuxiang.day20150515;

/**
 * Created by user20 on 2015/5/15.
 */
public class TextTwo extends TextOne {
    public Student[] student;

    public TextTwo(Student[] student) {
        super(student);
        this.student = student;
    }


    @Override
    public void output() {
        for (int i = 0; i < 10; i++) {
            if (student[i].getScore() > 60 && student[i].getSex().equals("男")) {
                System.out.println(student[i].getName() + "\b" + student[i].getSex() + "\b" + student[i].getScore() + "\b"
                        + student[i].getAge() + "\b" + student[i].getNumber() + "\b" + student[i].getAddress());
            }
        }
    }

    public void set(Interface anInterface){
        Student[] arraystudent = new Student[10];

        for (int i = 0; i <arraystudent.length ; i++) {
            arraystudent[i] = anInterface.getString(25)[i];
            if(arraystudent[i] != null){
            System.out.println(arraystudent[i].getName()+arraystudent[i].getAge()+arraystudent[i].getScore()
                    +arraystudent[i].getSex()+arraystudent[i].getAddress());
            }
        }
    }


}






